package com.example.demo.service;

import com.example.demo.entity.TeamAssignment;
import java.math.BigDecimal;
import java.util.List;

public interface TeamAssignmentService {

    // 基本CRUD操作
    TeamAssignment createTeamAssignment(TeamAssignment teamAssignment);

    TeamAssignment getTeamAssignmentById(Long id);

    List<TeamAssignment> getTeamAssignmentsByTeamId(Long teamId);

    List<TeamAssignment> getTeamAssignmentsByAssignmentId(String assignmentId);

    List<TeamAssignment> getTeamAssignmentsBySubmittedBy(Long submittedBy);

    List<TeamAssignment> getAllTeamAssignments();

    TeamAssignment updateTeamAssignment(TeamAssignment teamAssignment);

    boolean deleteTeamAssignment(Long id);

    // 统计查询
    int countTeamAssignmentsByTeamId(Long teamId);

    int countTeamAssignmentsByAssignmentId(String assignmentId);

    // 业务方法
    boolean updateScoreAndExcellent(Long id, BigDecimal score, Integer isExcellent);

    boolean submitAssignment(Long id, String filePath);

    List<TeamAssignment> getExcellentTeamAssignments();

    TeamAssignment getByTeamIdAndAssignmentId(Long teamId, String assignmentId);
}